package com.wetao.lib_common.bean.response;

import com.google.gson.Gson;
import com.wetao.lib_common.base.Base2Response;

import java.util.List;

/**
 * author: zhouyh
 * created on: 2020/11/15 10:43 AM
 * description:阅读推送记录数据
 */
public class ReadPushListInfo extends Base2Response {


    /**
     * data : {"records":[{"id":5,"title":"123","fileName":"合同测试模板.pdf","fileUrl":"http://cdn.newpage.ink/合同测试模板.pdf","readNum":0,"pushNum":4,"teacherId":78,"subjectId":15,"classIdList":"1,2,","state":1,"createTime":"2020-11-11 16:41:48","updateTime":"2020-11-11 16:41:48"},{"id":4,"title":"123","fileName":"合同测试模板.pdf","fileUrl":"http://cdn.newpage.ink/合同测试模板.pdf","readNum":0,"pushNum":4,"teacherId":78,"subjectId":15,"classIdList":"1,2,","state":1,"createTime":"2020-11-11 16:38:38","updateTime":"2020-11-11 16:38:38"},{"id":3,"title":"123","fileName":"file","fileUrl":"http://cdn.newpage.ink/合同_测试模板.pdf","readNum":0,"pushNum":1,"teacherId":78,"subjectId":15,"classIdList":"1,","state":1,"createTime":"2020-11-11 16:13:06","updateTime":"2020-11-11 16:13:06"},{"id":2,"title":"123","fileName":"file","fileUrl":"http://cdn.newpage.ink/合同_测试模板.pdf","readNum":0,"pushNum":1,"teacherId":78,"subjectId":15,"classIdList":"1,","state":1,"createTime":"2020-11-11 16:13:05","updateTime":"2020-11-11 16:13:05"},{"id":1,"title":"123","fileName":"file","fileUrl":"http://cdn.newpage.ink/file","readNum":0,"pushNum":1,"teacherId":78,"subjectId":15,"classIdList":"1,","state":1,"createTime":"2020-11-11 16:04:36","updateTime":"2020-11-11 16:04:36"}],"total":5,"size":10,"current":1,"pages":1}
     */

    private Data data;

    public static ReadPushListInfo objectFromData(String str) {

        return new Gson().fromJson(str, ReadPushListInfo.class);
    }

    public Data getData() {
        return data;
    }

    public void setData(Data data) {
        this.data = data;
    }

    public static class Data {
        /**
         * records : [{"id":5,"title":"123","fileName":"合同测试模板.pdf","fileUrl":"http://cdn.newpage.ink/合同测试模板.pdf","readNum":0,"pushNum":4,"teacherId":78,"subjectId":15,"classIdList":"1,2,","state":1,"createTime":"2020-11-11 16:41:48","updateTime":"2020-11-11 16:41:48"},{"id":4,"title":"123","fileName":"合同测试模板.pdf","fileUrl":"http://cdn.newpage.ink/合同测试模板.pdf","readNum":0,"pushNum":4,"teacherId":78,"subjectId":15,"classIdList":"1,2,","state":1,"createTime":"2020-11-11 16:38:38","updateTime":"2020-11-11 16:38:38"},{"id":3,"title":"123","fileName":"file","fileUrl":"http://cdn.newpage.ink/合同_测试模板.pdf","readNum":0,"pushNum":1,"teacherId":78,"subjectId":15,"classIdList":"1,","state":1,"createTime":"2020-11-11 16:13:06","updateTime":"2020-11-11 16:13:06"},{"id":2,"title":"123","fileName":"file","fileUrl":"http://cdn.newpage.ink/合同_测试模板.pdf","readNum":0,"pushNum":1,"teacherId":78,"subjectId":15,"classIdList":"1,","state":1,"createTime":"2020-11-11 16:13:05","updateTime":"2020-11-11 16:13:05"},{"id":1,"title":"123","fileName":"file","fileUrl":"http://cdn.newpage.ink/file","readNum":0,"pushNum":1,"teacherId":78,"subjectId":15,"classIdList":"1,","state":1,"createTime":"2020-11-11 16:04:36","updateTime":"2020-11-11 16:04:36"}]
         * total : 5
         * size : 10
         * current : 1
         * pages : 1
         */

        private int total;
        private int size;
        private int current;
        private int pages;
        private List<RecordsBean> records;

        public static Data objectFromData(String str) {

            return new Gson().fromJson(str, Data.class);
        }

        public int getTotal() {
            return total;
        }

        public void setTotal(int total) {
            this.total = total;
        }

        public int getSize() {
            return size;
        }

        public void setSize(int size) {
            this.size = size;
        }

        public int getCurrent() {
            return current;
        }

        public void setCurrent(int current) {
            this.current = current;
        }

        public int getPages() {
            return pages;
        }

        public void setPages(int pages) {
            this.pages = pages;
        }

        public List<RecordsBean> getRecords() {
            return records;
        }

        public void setRecords(List<RecordsBean> records) {
            this.records = records;
        }

        public static class RecordsBean {
            /**
             * "readPushId
             * "readPushTitle": "51255",
             * "pushTime": "2021-10-27 11:12:19",
             * "fileUrl": "f://0033",
             * "pdfUrl": "f://0033",
             * "subjectName": "物理",
             * "readTime": null,
             * "readStatus": 3    3表示未阅读  2已经
             */

            private Integer readPushId;
            private String readPushTitle;
            private String subjectName;
            private String fileUrl;
            private String pdfUrl;
            private Integer readTime;
            private Integer readStatus;
            private String pushTime;

            public static RecordsBean objectFromData(String str) {

                return new Gson().fromJson(str, RecordsBean.class);
            }

            public String getReadPushTitle() {
                return readPushTitle;
            }

            public void setReadPushTitle(String readPushTitle) {
                this.readPushTitle = readPushTitle;
            }

            public String getSubjectName() {
                return subjectName;
            }

            public void setSubjectName(String subjectName) {
                this.subjectName = subjectName;
            }

            public String getFileUrl() {
                return fileUrl;
            }

            public void setFileUrl(String fileUrl) {
                this.fileUrl = fileUrl;
            }

            public String getPdfUrl() {
                return pdfUrl;
            }

            public void setPdfUrl(String pdfUrl) {
                this.pdfUrl = pdfUrl;
            }

            public Integer getReadTime() {
                return readTime;
            }

            public void setReadTime(Integer readTime) {
                this.readTime = readTime;
            }

            public Integer getReadStatus() {
                return readStatus;
            }

            public void setReadStatus(Integer readStatus) {
                this.readStatus = readStatus;
            }

            public String getPushTime() {
                return pushTime;
            }

            public void setPushTime(String pushTime) {
                this.pushTime = pushTime;
            }

            public Integer getReadPushId() {
                return readPushId;
            }

            public void setReadPushId(Integer readPushId) {
                this.readPushId = readPushId;
            }
        }
    }
}
